<template>
  <div class="son-b">
    我是bbb组件---{{ num }}
  </div>
</template>
<script>
export default {
  data() {
    return {
      num: 0
    }
  },
  mounted() {
    this.$bus.$on('atob', (val) => {
      console.log(val)
      this.num = val
    })
  },
  beforeDestroy() {
    this.$bus.$off()
  }
}
</script>
<style lang="scss" scoped>
.son-b{
    width: 100px;
    height: 100px;
    border:5px solid rgb(15, 15, 15);
}
</style>
